//
//  XTCPersonInfoExitButtonCell.m
//  ppkc2016
//
//  Created by 拼凑的断音 on 16/5/11.
//  Copyright © 2016年 拼凑的断音. All rights reserved.
//

#import "XTCPersonInfoExitButtonCell.h"
#import "XXTool.h"

@interface XTCPersonInfoExitButtonCell ()

@property (nonatomic,strong) DKButton *exitButton;

@end

@implementation XTCPersonInfoExitButtonCell

#pragma mark getter
-(DKButton*)exitButton
{
    if (_exitButton==nil)
    {
        _exitButton = [[DKButton alloc] init];
        _exitButton.text = NSLocalizedString(@"退出登录", nil);
        _exitButton.textColor = [UIColor colorWithRed:185/255.0 green:185/255.0 blue:185/255.0 alpha:1.0];
        _exitButton.font = [XXTool systemFontOfSize:15];
        _exitButton.layer.borderColor = [UIColor colorWithRed:185/255.0 green:185/255.0 blue:185/255.0 alpha:1.0].CGColor;
        _exitButton.layer.borderWidth = 1.5f;
        [_exitButton setColor:[UIColor clearColor] ForState:DKButtonStateNormal];
        _exitButton.layer.cornerRadius = 3;
        [_exitButton addTarget:self Select:@selector(clickExitButton) ForEvent:DKButtonEventPressedEnd];
        [self addSubview:_exitButton];
    }
    return _exitButton;
}

-(void)refreshLayout:(CGRect)frame
{
    self.exitButton.frame = CGRectMake(8.5
                                       , 4
                                       , frame.size.width-17
                                       , 40);
}

-(void)clickExitButton
{
    if ([_delegate respondsToSelector:@selector(personInfoExitCellDidClickButton)])
    {
        [_delegate personInfoExitCellDidClickButton];
    }
}


@end
